package com.zmj.entity;

import java.math.BigDecimal;
import java.util.Date;

public class Goods {
	

	private int gid;
	private String gname;
	private String glongname;
	private BigDecimal gprice;
	private String gimage;
	private int gtype;
	private String gdesc;
	private Date gdistime;
	private float gdiscount;
	private int gnew;
	
	private int buynumber=1;
	public int getBuynumber() {
		return buynumber;
	}


	public void setBuynumber(int buynumber) {
		this.buynumber = buynumber;
	}

	private String gtypename;//商品类别名称
	private String gtypedesc;//商品类别描述
	
	//价格区间范围查找商品
	private float startprice = 0;
	private float endprice = 0;
	
	private Page page;//用来分页的实体类

	public int getGid() {
		return gid;
	}

	
	public Date getGdistime() {
		return gdistime;
	}


	public float getStartprice() {
		return startprice;
	}


	public void setStartprice(float startprice) {
		this.startprice = startprice;
	}


	public float getEndprice() {
		return endprice;
	}


	public void setEndprice(float endprice) {
		this.endprice = endprice;
	}


	public void setGdistime(Date gdistime) {
		this.gdistime = gdistime;
	}



	public void setGid(int gid) {
		this.gid = gid;
	}

	public String getGname() {
		return gname;
	}

	public void setGname(String gname) {
		this.gname = gname;
	}

	public String getGlongname() {
		return glongname;
	}

	public void setGlongname(String glongname) {
		this.glongname = glongname;
	}

	public BigDecimal getGprice() {
		return gprice;
		
	}

	public void setGprice(BigDecimal gprice) {
		this.gprice = gprice;
	}

	public String getGimage() {
		return gimage;
	}

	public void setGimage(String gimage) {
		this.gimage = gimage;
	}

	public int getGtype() {
		return gtype;
	}

	public void setGtype(int gtype) {
		this.gtype = gtype;
	}

	public String getGdesc() {
		return gdesc;
	}

	public void setGdesc(String gdesc) {
		this.gdesc = gdesc;
	}

	public float getGdiscount() {
		return gdiscount;
	}

	public void setGdiscount(float gdiscount) {
		this.gdiscount = gdiscount;
	}

	public int getGnew() {
		return gnew;
	}

	public void setGnew(int gnew) {
		this.gnew = gnew;
	}

	public String getGtypename() {
		return gtypename;
	}

	public void setGtypename(String gtypename) {
		this.gtypename = gtypename;
	}

	public String getGtypedesc() {
		return gtypedesc;
	}

	public void setGtypedesc(String gtypedesc) {
		this.gtypedesc = gtypedesc;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}


	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("{\"gid\":\"");
		builder.append(gid);
		builder.append("\",\"gname\":\"");
		builder.append(gname);
		builder.append("\",\"glongname\":\"");
		builder.append(glongname);
		builder.append("\",\"gprice\":\"");
		builder.append(gprice);
		builder.append("\",\"gimage\":\"");
		builder.append(gimage);
		builder.append("\",\"gtype\":\"");
		builder.append(gtype);
		builder.append("\",\"gdesc\":\"");
		builder.append(gdesc);
		builder.append("\",\"gdistime\":\"");
		builder.append(gdistime);
		builder.append("\",\"gdiscount\":\"");
		builder.append(gdiscount);
		builder.append("\",\"gnew\":\"");
		builder.append(gnew);
		builder.append("\",\"buynumber\":\"");
		builder.append(buynumber);
		builder.append("\",\"gtypename\":\"");
		builder.append(gtypename);
		builder.append("\",\"gtypedesc\":\"");
		builder.append(gtypedesc);
		builder.append("\",\"startprice\":\"");
		builder.append(startprice);
		builder.append("\",\"endprice\":\"");
		builder.append(endprice);
		builder.append("\",\"page\":\"");
		builder.append(page);
		builder.append("\"}");
		return builder.toString();
	}



}